<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var bo = isNaN(NaN);
        console.log(bo);
        console.log(isNaN(123));
        console.log(isNaN('123'));
        console.log(isNaN('acb')); //隐式调用了Number('acb')
        console.log(isNaN(null));
    </script>

    <script>
        var a = '123';
        // a ++;   // 隐式调用了Number(),只要有++，先类型转换
        // a = a + 1; //注意，和a++不一样，当两侧有字符串时，隐式调用String()
        console.log(a++);
        console.log(-a);
        console.log(+a);
    </script>


    <script>
        var b = "3" * 2;
        console.log(b + ":" + typeof(b));

        var c = "3" > 2;  //Number()
        console.log(c + ":" + typeof(c));

        var d = "3" > '2';  //比较asc码 
        console.log(d + ":" + typeof(d));

        var c = "3" == 3;  //Number()
        console.log(c + ":" + typeof(c));
        console.log(100 > 10 > 1);// 从左到右计算，然后true > 1 返回false

        console.log(undefined == null);
        console.log(undefined === null);
        console.log(null === null);
        console.log(undefined === undefined);
        console.log(undefined == 0);
        console.log(undefined > 0);
        console.log(undefined < 0);
        console.log(null == 0);
        console.log(null > 0);
        console.log(null < 0);
        console.log(NaN == NaN); //NaN谁都不等于
        console.log(NaN === NaN);
        console.log(1 === '1');
    </script>



</body>

</html>